﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="it.aspx.cs" Inherits="Com.Rivyer.Web.contact.it" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>信息科联系方式</title>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../css/rivcontent.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <%if (DesignMode)
      { %>
    <script type="text/javascript" src="../js/ASPxScriptIntelliSense.js"></script>
    <%} %>
    <script type="text/javascript">
        
    </script>
    <div>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td height="30">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td height="24" bgcolor="#353c44">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td>
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td width="6%" height="19" valign="bottom">
                                                        <div align="center">
                                                            <img src="../images/tb.gif" width="14" height="14" /></div>
                                                    </td>
                                                    <td width="94%" valign="bottom">
                                                        <span class="STYLE1">信息科联系方式</span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="center" style="font-size: 12px">
                    <div id="rivcontent">
                        <div class="title">
                            信息科联系方式
                        </div>
                        <dx:ASPxGridView ID="itinfo" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
                            KeyFieldName="username" Font-Size="12px" OnRowUpdated="itinfo_RowUpdated" 
                            Settings-ShowFilterRowMenu="True" onrowupdating="itinfo_RowUpdating" Width="750px">
                            <Columns>
                                <dx:GridViewCommandColumn Caption="操作" VisibleIndex="0" Width="45px">
                                    <EditButton Visible="True" Text="编辑">
                                    </EditButton>
                                    <UpdateButton Text="更新">
                                    </UpdateButton>
                                    <CancelButton Text="取消">
                                    </CancelButton>
                                </dx:GridViewCommandColumn>
                                <dx:GridViewDataTextColumn Caption="姓名" FieldName="realname" VisibleIndex="1" Width="130px">
                                    <EditFormSettings Visible="False" />
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="电话" FieldName="telephone" VisibleIndex="2" Width="130px">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="QQ" FieldName="qq" VisibleIndex="3" Width="130px">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn Caption="用户名" FieldName="username" ReadOnly="True" Visible="False"
                                    VisibleIndex="4">
                                    <EditFormSettings Visible="False" />
                                </dx:GridViewDataTextColumn>
                            </Columns>
                            <SettingsPager PageSize="16">
                            </SettingsPager>
                            <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                            <Styles>
                                <Header HorizontalAlign="Center">
                                </Header>
                                <Cell HorizontalAlign="Center">
                                </Cell>
                            </Styles>
                        </dx:ASPxGridView>
                        <span class="tips">Tips:</span>1.手机号码正确;2.QQ号码必须大于10000;
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ITConnectionString %>"
        DeleteCommand="DELETE FROM [tb_userinfo] WHERE [username] = @username" InsertCommand="INSERT INTO [tb_userinfo] ([realname], [telephone], [qq], [username]) VALUES (@realname, @telephone, @qq, @username)"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT [realname], [telephone], [qq], [username] FROM [tb_userinfo]"
        UpdateCommand="UPDATE [tb_userinfo] SET [realname] = @realname, [telephone] = @telephone, [qq] = @qq WHERE [username] = @username">
        <DeleteParameters>
            <asp:Parameter Name="username" Type="String" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="realname" Type="String" />
            <asp:Parameter Name="telephone" Type="String" />
            <asp:Parameter Name="qq" Type="String" />
            <asp:Parameter Name="username" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="realname" Type="String" />
            <asp:Parameter Name="telephone" Type="String" />
            <asp:Parameter Name="qq" Type="String" />
            <asp:Parameter Name="username" Type="String" />
        </UpdateParameters>
    </asp:SqlDataSource>
    </form>
</body>
</html>
